package com.wyzz.hr.util.pager;

import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractUITag;

public class PagerTag extends AbstractUITag {

	public PagerTag() {
	}

	public Component getBean(ValueStack arg0, HttpServletRequest arg1,
			HttpServletResponse arg2) {
		return new PagerComp(arg0, arg1, arg2);
	}

	protected void populateParams() {
		super.populateParams();
		PagerComp pager = (PagerComp) component;
		pager.setPageNo(pageNo);
		pager.setTotalPages(totalPages);
		pager.setTotalRows(totalRows);
		pager.setStart(start);
		pager.setEnd(end);
		pager.setFormId(formId);
		pager.setStyleClass(styleClass);
		pager.setTheme(theme);
	}

	public String getPageNo() {
		return pageNo;
	}

	public void setPageNo(String pageNo) {
		this.pageNo = pageNo;
	}

	public String getStyleClass() {
		return styleClass;
	}

	public void setStyleClass(String styleClass) {
		this.styleClass = styleClass;
	}

	public String getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(String totalPages) {
		this.totalPages = totalPages;
	}

	public String getTotalRows() {
		return totalRows;
	}

	public void setTotalRows(String totalRows) {
		this.totalRows = totalRows;
	}

	public String getEnd() {
		return end;
	}

	public void setEnd(String end) {
		this.end = end;
	}

	public String getStart() {
		return start;
	}

	public void setStart(String start) {
		this.start = start;
	}

	public String getFormId() {
		return formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}

	private String pageNo;
	private String totalPages;
	private String totalRows;
	private String start;
	private String end;
	private String formId;
	private String styleClass;
}
